#define _CRT_SECURE_NO_WARNINGS 1

#include <iostream>
#include <map>
using namespace std;

int main()
{
    string s;
    cin >> s;
    map<char, int> m;
    for (auto it : s)
    {
        m[it]++;
    }
    for (auto it : m)
    {
        if (it.second == 1)
        {
            cout << it.first << endl;
            return 0;
        }
    }
    cout << -1 << endl;
    return 0;
}